package com.sskj.aikeeper.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.aikeeper.bean.CoinDescribeBean;
import com.sskj.aikeeper.hangqing.activity.ChartActivity;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;


/**
 * @author Hey
 * Create at  2019/07/08
 */
public class ChartPresenter extends BasePresenter<ChartActivity> {

    public void getCoinDescribe(String coinCode) {
        httpService.getCoinDescribe(coinCode)
                .tag(this)
                .execute(new JsonCallBack<HttpData<CoinDescribeBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<CoinDescribeBean>> response) {
                        mView.getCoinDescribeOK(response.body().getData());
                    }
                });
    }
}
